<template>
    <p>子元素</p>
    <slot :sonName="name">子元素默认的内容</slot>
</template>

<script>
export default {
    data(){
        return {
            name:'Tom'
        }
    }
}
</script>